Smooth heaps and a dual view of self-adjusting data structures
نویسندگان
چکیده
We present a new connection between self-adjusting binary search trees (BSTs) and heaps, two fundamental, extensively studied, and practically relevant families of data structures (Allen, Munro, 1978; Sleator, Tarjan, 1983; Fredman, Sedgewick, Sleator, Tarjan, 1986; Wilber, 1989; Fredman, 1999; Iacono, Özkan, 2014). Roughly speaking, we map an arbitrary heap algorithm within a broad and natural model, to a corresponding BST algorithm with the same cost on a dual sequence of operations (i.e. the same sequence with the roles of time and key-space switched). This is the first general transformation between the two families of data structures. There is a rich theory of dynamic optimality for BSTs (i.e. the theory of competitiveness between BST algorithms). The lack of an analogous theory for heaps has been noted in the literature (e.g. Pettie; 2005, 2008). Through our connection, we transfer all instance-specific lower bounds known for BSTs to a general model of heaps, initiating a theory of dynamic optimality for heaps. On the algorithmic side, we obtain a new, simple and efficient heap algorithm, which we call the smooth heap. We show the smooth heap to be the heap-counterpart of Greedy, the BST algorithm with the strongest proven and conjectured properties from the literature, widely believed to be instance-optimal (Lucas, 1988; Munro, 2000; Demaine et al., 2009). Assuming the optimality of Greedy, the smooth heap is also optimal within our model of heap algorithms. Intriguingly, the smooth heap, although derived from a non-practical BST algorithm, is simple and easy to implement (e.g. it stores no auxiliary data besides the keys and tree pointers). It can be seen as a variation on the popular pairing heap data structure, extending it with a “power-of-two-choices” type of heuristic. For the smooth heap we obtain instance-specific upper bounds, with applications in adaptive sorting, and we see it as a promising candidate for the long-standing question of a simpler alternative to Fibonacci heaps. The paper is dedicated to Raimund Seidel on occasion of his sixtieth birthday. ∗TU Eindhoven, Netherlands. Work done while at the Blavatnik School of Computer Science, Tel Aviv University, Israel. E-mail: [email protected]. †KTH Royal Institute of Technology, Stockholm, Sweden. E-mail: [email protected]. ar X iv :1 80 2. 05 47 1v 1 [ cs .D S] 1 5 Fe b 20 18
منابع مشابه
Self-Adjusting Heaps
In this paper we explore two themes in data structure design: amortized computational complexity and self-adjustment. We are motivated by the following observations. In most applications of data structures, we wish to perform not just a single operation but a sequence of operations, possibly having correlated behavior. By averaging the running time per operation over a worst-case sequence of op...
متن کاملPairing Heaps are Sub - optimalbyMichael
Pairing heaps were introduced as a self-adjusting alternative to Fibonacci heaps. They provably enjoy log n amortized costs for the standard heap operations. Although it has not been veri ed that pairing heaps perform the decrease key operation in constant amortized time, this has been conjectured and extensive experimental evidence supports this conjecture. Moreover, pairing heaps have been ob...
متن کاملPairing heaps with O(log log n) decrease cost
We give a variation of the pairing heaps for which the time bounds for all the operations match the lower bound proved by Fredman for a family of similar self-adjusting heaps. Namely, our heap structure requires O(1) for insert and findmin, O(log n) for delete-min, and O(log logn) for decreasekey and meld (all the bounds are in the amortized sense except for find-min).
متن کاملTransmission properties of one dimensional fractal structures
In this paper, the optical properties of one dimensional fractal structures are investigated. We consider six typical fractal photonic structures: the symmetric dual cantor-like fractal structure, the asymmetric dual cantor-like fractal structure, the single cantor-like fractal structure, the symmetric dual golden-section fractal structure, the asymmetric dual golden-section fractal structure a...
متن کاملExploring the self-care challenges in patients undergoing hemodialysis: A conventional content analysis
Background & Aim: Self-care plays an important role in the management of care for patients with chronic renal failure. In order to provide effective education, it is necessary to identify problems, concerns and challenges in this group of patients. The aim of this study was to explore the challenges of self-care in the patients undergoing hemodialysis. Methods & Materials: This study is part o...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1802.05471 شماره
صفحات -
تاریخ انتشار 2018